
public class Main {

	public static void main(String[] args) {
		Fourchette f1 = new Fourchette(1);
		Fourchette f2 = new Fourchette(2);
		Fourchette f3 = new Fourchette(3);
		Fourchette f4 = new Fourchette(4);
		
		Philosophe p1 = new Philosophe(1,f1,f2);
		Philosophe p2 = new Philosophe(2,f2,f3);
		Philosophe p3 = new Philosophe(3,f3,f4);
		Philosophe p4 = new Philosophe(4,f4,f1);
		
		MonThread t1 = new MonThread(p1);
		MonThread t2 = new MonThread(p2);
		MonThread t3 = new MonThread(p3);
		MonThread t4 = new MonThread(p4);
		
		t1.start();
		t2.start();
		t3.start();
		t4.start();
		
		try {
			t1.join();
			t2.join();
			t3.join();
			t4.join();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		System.out.println("===================================");
		System.out.println("=               BILAN             =");
		System.out.println("===================================");
		p1.totalMiam();
		p2.totalMiam();
		p3.totalMiam();
		p4.totalMiam();
		System.out.println("===================================");
	}

}
